package mx.com.sinformex.chat.core.server;

import java.util.List;

import mx.com.sinformex.chat.core.Manager;
import mx.com.sinformex.chat.core.client.IChatClient;

/**
 * @author Oscar Ivan Hernandez Ventura [ oscar at sinformex dot com dot mx]
 *
 * @version $ Id : IChatServer.java , v 1.0 Aug 12, 2009 angellore $
 */
public interface IChatServer extends Runnable {
	
	/**
	 * Start the server, setting and initialiting variables, but not call Runnable.run() method
	 */
	public void start();
	public void stop();
	public void setManager(Manager manager);
	public void setPort(String port);
	/**
	 * Set room names in a list, if empty, the server creates a defualt one
	 */
	public void setRooms(List<String> rooms);
	public List<IChatRoom> getRooms() ;
	
	/**
	 * Joins the given client given room
	 */
	public void joinToRoom(IChatClient client, String roomName);
	
	/**
	 * Removes the given client from the given room
	 */
	public void removeToRoom(IChatClient client, String roomName);

}
